const ava = require('ava')
const leftPad = require('left-pad')

ava.serial('routes map', async t => {
    const {stack} = require('../routes')
    let index = 1

    // console.log('|INDEX|METHOD|URL|')
    // console.log('|------:|-----:|:-----|')
    stack.forEach(function(sta) {
        if (sta.methods.length) {
            console.log(`${leftPad(index++, 5, 0)}. \`${leftPad(sta.methods.join(' '), 8)}\` \`${sta.path}\``)
        }
    })


    t.pass()
})


